Restart session either by using GUI Session > Restart R or by Ctrl + Shift + F10.
Load packages and restore your work.
set.seed(1234)
if (!require("tidyverse")) install.packages("tidyverse"); library("tidyverse")## Loading required package: tidyverse
## -- Attaching packages --------------------------------------------------------- tidyverse 1.2.1 --
## v ggplot2 3.1.0 v purrr 0.3.0
## v tibble 2.0.1 v dplyr 0.7.8
## v tidyr 0.8.2 v stringr 1.4.0
## v readr 1.3.1 v forcats 0.3.0
## -- Conflicts ------------------------------------------------------------ tidyverse_conflicts() --
## x dplyr::filter() masks stats::filter()
## x dplyr::lag() masks stats::lag()
if (!require("sf")) install.packages("sf"); library("sf")## Loading required package: sf
## Linking to GEOS 3.6.1, GDAL 2.2.3, PROJ 4.9.3
if (!require("tmap")) install.packages("tmap"); library("tmap")## Loading required package: tmap
if (!require("sjmisc")) install.packages("sjmisc"); library("sjmisc")## Loading required package: sjmisc
##
## Attaching package: 'sjmisc'
## The following object is masked from 'package:purrr':
##
## is_empty
## The following object is masked from 'package:tidyr':
##
## replace_na
## The following object is masked from 'package:tibble':
##
## add_case
SA2_SEIFA <- readRDS("data/SA2_SEIFA.Rds")Tip: clear your R console with Ctrl + R.
tmap_mode("view")## tmap mode set to interactive viewing
SA2_SEIFA %>%
qtm(fill = "IRSAD_d")tm_shape(SA2_SEIFA) +
tm_polygons(col = "IRSAD_d",
n = 10, alpha = 0.7, palette = "RdYlGn", lwd = 0)